import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const module = {
  state: {
      acts: {
          'clientUpdate':  'CustomerEdit',
          'priceAdjust':  'ChangePrice',
          'dispatch':  'SellDispatch', //销售单调度
          'salesOut':  'OutStoreRoom',
          'pickinglistOut':  'OutStoreRm', //领料单
          'materialOut':  'OutStoreRoom', //销售订单
          'scrapOut':  'ScrapOutStoreRm', //报废单
          'transferOut':  'TransferOutStoreRm', //库房调拨出库
          'transferIn':  'TransferFeedStoreRm', //库房调拨入库
          'transAdjust':  'EditLine',
          'settleConfirm':  'SellFinalSure',  //销售订单结算确认
          'fareConfirm':  'ConfirmFare',
          'qacheck4sc': 'Examine',
          'approval2':  'CommonExamine', //销售订单
          'approval4': 'Examine', //报废单
          'approval5': 'Examine5', //入库申请单
          'approval6': 'Examine6', //领料单
          'approval7': 'Examine7', //库房调拨
          'approval8': 'Examine7', //库房调拨
          'approval9': 'Examine7', //库房调拨
          'approval10': 'Examine10', //销售客户充值
          'ChargeIn': 'RechargeFinaExamine', //销售客户充值财务审批
          'materialIn': 'FeedStoreRm',
          'whinapply': 'ApplyStoreRm',
          'materapply': 'AddMaterialRetApply',
          'scrapapply': 'ApplyScrap',
          'bigOrder': 'DispatchCustomer', //大订单派单
          'orderMatch': 'PaybackDetail', //回款登记调度审批
          'approval15': 'DelPayback', //回款登记删除
          'finConfirm': 'PaybackExamine', //回款登记财务审批
          'approval16': 'Examine16', //物流结算
          'deletePayback': 'DelPayback', //回款登记删除
          'arrivalConfirm': 'ArrivalConfirm', //物流到货确认
          'confirmFreight': 'ConfirmPassport', //运费确认
          'shareCar': 'ShareCar', //物流拼车
          'fareAudit': 'PassportExamine', //运费结算主管审批
          'payConfirm': 'PassportPayConfirm', //运费结算付款确认
          'payBack': 'SellPayBack', //销售订单回款登记
          'sendCar7': 'reSendCar' //调拨派车
      },
      actParam: {},
      wlorders: [],
      wlOrdercode: '',
      customerActype: ''
  },
  getters: {},
  mutations: {
    setActParam(state, payload){
      state.actParam = payload;
    },
    setWlorders(state, payload){
      state.wlorders = payload;
    },
    setWlOrdercode(state, payload){
      state.wlOrdercode = payload;
    },
      setCustomerActype(state, payload){
          state.customerActype = payload;
      },
  },
}


const store = new Vuex.Store(module)
export default store
